import {Button, message} from "antd"
import {reset} from "../../../request/fake-db"
import {useOutletContext} from "react-router-dom"

function Home() {
    const [onMenuChange] = useOutletContext()
    return (
        <>
            <h1>如果天才的你把权限管理页面给关闭或删除了，可以在这里重置数据库。</h1>
            <Button type="primary" onClick={() => {
                reset()
                message.success('数据库重置成功')
                onMenuChange()
            }}>重置数据库</Button>
        </>
    )
}

export default Home